#include "MainWidget.h"

#include <QApplication>
#include <QFile>
int main(int argc, char *argv[])
{
    QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
//    qputenv("QT_SCALE_FACTOR", "2.0");

    QApplication a(argc, argv);
    QString skinPath = QString(":/skin/skin_kila.qss");
    QFile file(skinPath);
    if (file.open(QFile::ReadOnly))
    {
        QString styleSheet = QLatin1String(file.readAll());
        qApp->setStyleSheet(styleSheet);
        file.close();
    }
    QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
    QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);

    CMainWidget w;
    w.show();
    return a.exec();
}
